<div class="body-panel" style="min-height: 680px" ng-controller="merchantUpdateController">
    <div style="width: 95%; margin: auto;">
        <h2>
            Update Info
            <small>You can update your information here.</small>
        </h2>
    </div>
    <div
            style="background-color: #fafcfe; border: 1px solid #dfe8f2; width: 95%; margin: auto; position: relative; top: 20px; height: 880px;">
        <div style="margin: 35px 0 0 27%; margin-bottom: 20px;">
            <img style="width: 250px; height: 200px; border-radius: 20px;"
                 ng-src="{{constant.imgServer}}{{merchant.logo}}" >
        </div>

        <!--            <input type="hidden" name="mId" value="${merchant.mId}" />-->
        <div class="form-group">
            <label class="control-label col-md-3"
                   style="text-align: right; margin-top: 6px;">Tel: </label>
            <div class="col-md-8 custom-input">
                <input class="form-control" type="text" ng-model="merchant.mtel">
            </div>
        </div>
        <br/> <br/> <br/>
        <div class="form-group">
            <label class="control-label col-md-3"
                   style="text-align: right; margin-top: 6px;">Name: </label>
            <div class="col-md-8 custom-input">
                {{merchant.mname}}
            </div>
        </div>
        <br/> <br/>
        <div class="form-group">
            <label class="control-label col-md-3"
                   style="text-align: right; margin-top: 6px;">Type: </label>
            <div class="col-md-8 custom-input">
                <select class="form-control" name="type" id="type">

                    <option value="{{merchant.type}}" selected="selected">{{merchant.types}}</option>

                    <option value="1">Fast Food</option>
                    <option value="2">Special Food</option>
                    <option value="3">Western Food</option>
                    <option value="4">Refreshment</option>
                    <option value="5">Dessert</option>
                    <option value="6">Fruit</option>
                </select>
            </div>
        </div>
        <br/> <br/>
        <div class="form-group">
            <label class="control-label col-md-3"
                   style="text-align: right; margin-top: 6px;">Address: </label>
            <div class="col-md-8 custom-input">
                <input class="form-control" type="text" ng-model="merchant.address">
            </div>
        </div>
        <br/> <br/> <br/>

        <div class="form-group">
            <label class="control-label col-md-3"
                   style="text-align: right; margin-top: 6px;">Password: </label>
            <div class="col-md-8 custom-input">
                <input class="form-control" type="password"
                       placeholder="Password" name="password">
            </div>
        </div>
        <br/> <br/>
        <div class="form-group">
            <label class="control-label col-md-3"
                   style="text-align: right; margin-top: 6px;">Confirm
                Password: </label>
            <div class="col-md-8 custom-input">
                <input class="form-control" type="password"
                       placeholder="Confirm Password" name="repassword">
            </div>
        </div>
        <br/>
        <div class="col-md-12 col-md-offset-3">
            <input type="file" ngf-select ng-model="file"
                   accept="image/*" ngf-max-size="2MB" required
                   ngf-model-invalid="errorFile" style="margin-top:10px">
            <img ng-show="form.file.$valid" ngf-thumbnail="file" class="thumb" style="width: 200px;height: 150px; margin-bottom: 10px;">
            <button class="btn btn-primary" ng-click="file = null" ng-show="file" style="margin-top: 121px;"><span class="glyphicon glyphicon-trash" aria-hidden="true"></span></button>
        </div>
        <br>
        <span ng-show="file.result">Upload Successful</span>
        <span class="err" ng-show="errorMsg">{{errorMsg}}</span>
        <div class="text-center">
            <button class="btn btn-primary" style="width: 200px;" ng-click="update()">Save</button>
        </div>

    </div>
</div>